WebImgLoadView = BaseView:Extend()

function WebImgLoadView:New()
    local o = WebImgLoadView.super.New(self)
    o.abName = "ui_webimgload"
    o.resName = "WebImgLoadView"
    o.layer = ENUM.UI_LAYER.TOP
    o.item_list = {}
    return o
end

function WebImgLoadView:loadSuccess()
    self.btn_create = GetNode(self.transform,{"btn_create"},"GameObject")
    self.inputField = GetNode(self.transform,{"InputField"},"_InputField")
    self.webImage = GetNode(self.transform,{"webImage"},"_YImage")
    self:InitEvent()
end

function WebImgLoadView:InitEvent()
	local click_func = function (target)
        Debug.Log("weburl === {0}",self.inputField.text)
		if CS.WebImageManager.IsFromWeb(self.inputField.text) then
			self.webImage.spriteName = self.inputField.text
		end
	end
	AddClick(self.btn_create,click_func)
end